<template>
  <div>
    <div class="header">
      <span>{{ title }}</span>
      <span class="iconfont icon-xinxi2"></span>
    </div>
    <div class="content">
        <div class="data">
            {{ num }}
        </div>
        <slot name="content"></slot>
    </div>
    <footer class="footer"> 
        <slot name="footer"></slot>
    </footer>
  </div>
</template>

<script>
export default {
  name: "Card",
  props: ["title", "num"],
};
</script>

<style>
.header {
  display: flex;
  justify-content: space-between;
  color: #d9d9d9;
  align-items: center;
}
.header .iconfont {
  font-size: 12px;
}
.content .data {
    font-size: 30px;
    margin: 8px 0;
}
.content .iconfont,
.footer .iconfont {
  color: red;
  margin: 0 2px;
}
.content .xiajiang,
.footer .xiajiang {
    color: #1afa29
}
.content .box {
    font-size: 16px;
    height: 50px;
    padding-bottom: 8px;
}
.footer {
    padding: 8px 0 0 0;
    border-top: 1px solid #eee;
}
.footer .box {
    font-size: 12px;
}
</style>